package
{
	import flash.display.Stage;
	import flash.events.KeyboardEvent;
	
	public class SimpleKeyboard
	{
		public static const KEY_COUNT:uint = 256;
		private static var keysDown:Array = new Array(KEY_COUNT);
		
		public function SimpleKeyboard(stage:Stage):void
		{
			
			
		}
		public static function Init(stage:Stage):void
		{
			
			stage.addEventListener(KeyboardEvent.KEY_DOWN,OnKeyDown);
			stage.addEventListener(KeyboardEvent.KEY_UP,OnKeyUp);	
		}
		private static function OnKeyDown(k:KeyboardEvent):void
		{
			keysDown[k.keyCode] = true;
		}
		private static function OnKeyUp(k:KeyboardEvent):void
		{
			keysDown[k.keyCode] = false;;
		}
		public static function KeyDown(key:uint):Boolean
		{
			return keysDown[key];
		}
	}
}